home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / dbase / do1beta.zip / PRINTER.DO < prev    next >
Text File  |  1991-07-09  |  572b  |  24 lines

  1. /*
  2.     this is a demonstration of dObject's printer handling features
  3.     open the printer and print 10 lines to it without echoing the
  4.     lines to the screen
  5. */
  6. p = new(File,"prn:",1,0,0);
  7. writeDevice(p);
  8. i = 1;
  9. while(i < 10) {
  10.     ? "printing line ",i;
  11.     i = i+1;
  12. }
  13.  
  14. /*
  15.     note: on some printers (HP II, Epson EPL-6000) it is necessary
  16.     to send an ESC E to flush the printer... consult your printer 
  17.     manual to see if the next line is necessary, otherwise the
  18.     "flush" method should work OK by itself
  19. */
  20. ? chr(27),'E';
  21. flush(p);
  22. close(p);
  23. ? "printout is done";
  24.